package com.llf.Service;

import com.llf.Mapper.ProviderMapper;
import com.llf.Pojo.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ProviderServiceImpl implements ProviderService {
    @Autowired
    private ProviderMapper providerMapper;
    @Override
    public int addProvider(Provider provider) {
        return providerMapper.addProvider(provider);
    }



    @Override
    public int deleteProviderById(int id) {
        return providerMapper.deleteProviderById(id);
    }

    @Override
    public Provider getProviderById(int id) {
        return providerMapper.getProviderById(id);
    }

    @Override
    public int updatePrivider(Provider provider) {
        return providerMapper.updatePrivider(provider);
    }

    @Override
    public ArrayList<Provider> getallProvider(String proCode, String proName) {
        return providerMapper.getallProvider(proCode,proName);
    }

    @Override
    public ArrayList<Provider> getProName() {
        return providerMapper.getProName();
    }


}
